package com.ruoyi.project.lely.bean.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

/**
 * 订单商品
 *
 * @author luoyong
 */
@Data
@ApiModel("订单商品 入参DTO")
public class LyOrderGoodsDTO {

    @ApiModelProperty("ID")
    private Long id;

    @NotNull
    @ApiModelProperty("订单表的订单ID")
    private Integer orderId;

    @ApiModelProperty("入驻品牌店铺编码")
    private Integer brandId;

    @NotNull
    @ApiModelProperty("商品表的商品ID")
    private Integer goodsId;

    @Length(max = 127, message = "商品名称长度不能超过127位")
    @NotEmpty
    @ApiModelProperty("商品名称")
    private String goodsName;

    @Length(max = 63, message = "商品编号长度不能超过63位")
    @NotEmpty
    @ApiModelProperty("商品编号")
    private String goodsSn;

    @NotNull
    @ApiModelProperty("商品货品表的货品ID")
    private Integer productId;

    @NotNull
    @ApiModelProperty("商品货品的购买数量")
    private Integer number;

    @Digits(integer = 10 - 2, fraction = 2)
    @NotNull
    @ApiModelProperty("商品货品的售价")
    private BigDecimal price;

    @Length(max = 1023, message = "商品货品的规格列表长度不能超过1023位")
    @NotEmpty
    @ApiModelProperty("商品货品的规格列表")
    private String specifications;

    @Length(max = 255, message = "商品货品图片或者商品图片长度不能超过255位")
    @NotEmpty
    @ApiModelProperty("商品货品图片或者商品图片")
    private String picUrl;

    @ApiModelProperty("订单商品评论，如果是-1，则超期不能评价；如果是0，则可以评价；如果其他值，则是comment表里面的评论ID。")
    private Integer comment;

    @ApiModelProperty("退款跟踪ID")
    private Integer refundId;

    @Digits(integer = 10 - 2, fraction = 2)
    @ApiModelProperty("代理结算佣金")
    private BigDecimal settlementMoney;

}
